﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Recepcjonista/Recepcjonista.Master" AutoEventWireup="true" CodeBehind="Faktura.aspx.cs" Inherits="Hotel_Management.Recepcjonista.Faktura" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent2" runat="server">
    &nbsp;
    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Larger" Text="Wystawianie Faktur/Rachunku"></asp:Label>
    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Wyswietl" />
    <br />
    <br />
&nbsp;<asp:Label ID="Label2" runat="server" Text="Imie:"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="Label3" runat="server" Text="Nazwisko:"></asp:Label>
    <br />
    <asp:TextBox ID="TextBox1" runat="server">Zbigniew</asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="TextBox2" runat="server">Rasiak</asp:TextBox>
&nbsp;&nbsp;
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="LinqDataSource1" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="id_rez" HeaderText="id_rez" ReadOnly="True" SortExpression="id_rez" />
            <asp:BoundField DataField="id_kl" HeaderText="id_kl" ReadOnly="True" SortExpression="id_kl" />
            <asp:BoundField DataField="imie" HeaderText="imie" ReadOnly="True" SortExpression="imie" />
            <asp:BoundField DataField="nazwisko" HeaderText="nazwisko" ReadOnly="True" SortExpression="nazwisko" />
            <asp:BoundField DataField="PESEL" HeaderText="PESEL" ReadOnly="True" SortExpression="PESEL" />
        </Columns>
    </asp:GridView>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="Hotel2.App_Data.BazaDanych" EntityTypeName="" Select="new (id_rez, id_kl, imie, nazwisko, PESEL)" TableName="Kliencis" Where="imie == @imie &amp;&amp; nazwisko == @nazwisko">
        <WhereParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="imie" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBox2" Name="nazwisko" PropertyName="Text" Type="String" />
        </WhereParameters>
    </asp:LinqDataSource>
    <br />
&nbsp;<asp:Label ID="Label4" runat="server" Text="Rezerwacja nr:"></asp:Label>
    <br />
    <asp:TextBox ID="TextBox3" runat="server" Width="31px">0</asp:TextBox>
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="LinqDataSource2" OnSelectedIndexChanged="GridView2_SelectedIndexChanged">
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="id_rez" HeaderText="id_rez" ReadOnly="True" SortExpression="id_rez" />
            <asp:BoundField DataField="nr_pokoju" HeaderText="nr_pokoju" ReadOnly="True" SortExpression="nr_pokoju" />
            <asp:BoundField DataField="od" HeaderText="od" ReadOnly="True" SortExpression="od" />
            <asp:BoundField DataField="do" HeaderText="do" ReadOnly="True" SortExpression="do" />
        </Columns>
    </asp:GridView>
&nbsp;<asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="Hotel2.App_Data.BazaDanych" EntityTypeName="" Select="new (id_rez, nr_pokoju, od, do)" TableName="Reserwacjes" Where="id_rez == @id_rez">
        <WhereParameters>
            <asp:ControlParameter ControlID="TextBox3" Name="id_rez" PropertyName="Text" Type="Int32" />
        </WhereParameters>
    </asp:LinqDataSource>
    <br />
&nbsp;<asp:Label ID="Label5" runat="server" Text="Nr Pokoju:"></asp:Label>
    <br />
    <asp:TextBox ID="TextBox4" runat="server" Width="24px">0</asp:TextBox>
    <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataSourceID="LinqDataSource3" OnSelectedIndexChanged="GridView3_SelectedIndexChanged">
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="nr_pokoju" HeaderText="nr_pokoju" ReadOnly="True" SortExpression="nr_pokoju" />
            <asp:BoundField DataField="cena_doba" HeaderText="cena_doba" ReadOnly="True" SortExpression="cena_doba" />
        </Columns>
    </asp:GridView>
    <br />
&nbsp;
    <asp:Label ID="naleznosc" runat="server" Text="Należność: "></asp:Label>
    <asp:Label ID="Label6" runat="server"></asp:Label>
    <br />
&nbsp;
    <asp:Label ID="czas" runat="server" Text="Czas Pobytu: "></asp:Label>
    <asp:Label ID="Label7" runat="server"></asp:Label>
    <br />
&nbsp;
    <asp:Label ID="razem" runat="server" Text="Razem do zapłaty: "></asp:Label>
    <asp:Label ID="Label8" runat="server"></asp:Label>
&nbsp;<asp:LinqDataSource ID="LinqDataSource3" runat="server" ContextTypeName="Hotel2.App_Data.BazaDanych" EntityTypeName="" Select="new (nr_pokoju, cena_doba)" TableName="Pokojes" Where="nr_pokoju == @nr_pokoju">
        <WhereParameters>
            <asp:ControlParameter ControlID="TextBox4" Name="nr_pokoju" PropertyName="Text" Type="Int32" />
        </WhereParameters>
    </asp:LinqDataSource>
    <br />
</asp:Content>
